[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
RETURN
Function
Transfer program control back to a previously saved address.
Syntax
RETURN No arguments are required
Remarks
It is often necessary to perform an indentical set of instructions
several times in a program. This leaves you with two choices. One,
rewrite the code several times (and hope you do it right each time), or
two, write it once as a subroutine, then use GOSUB to run it. GOSUB
will save the address of the next line so that a RETURN at the end of
the subroutine can instruct PPL to resume execution with the line
following the GOSUB.
Examples
STRING Question, Answer
LET Question = "What is your street address ..."
GOSUB ask
LET Question = "What is your city, state and zip ..."
GOSUB ask
END
:ask ' Sub to ask a question, get an answer, and log them to a file
LET Answer = ""
PRINTLN "@X0E",Question
INPUT "",Answer
NEWLINES 2
FPUTLN 0,"Q: ",STRIPATX(Question)
FPUTLN 0,"A: ",Answer
RETURN
See Also:
END
GOSUB
GOTO
STOP
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson